home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / shells / sh03src.zoo / sh-pl03 / sh / nodes.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-22  |  2.1 KB  |  154 lines

  1. /*
  2.  * This file was generated by the mknodes program.
  3.  */
  4.  
  5. #define NSEMI 0
  6. #define NCMD 1
  7. #define NPIPE 2
  8. #define NREDIR 3
  9. #define NBACKGND 4
  10. #define NSUBSHELL 5
  11. #define NAND 6
  12. #define NOR 7
  13. #define NIF 8
  14. #define NWHILE 9
  15. #define NUNTIL 10
  16. #define NFOR 11
  17. #define NCASE 12
  18. #define NCLIST 13
  19. #define NDEFUN 14
  20. #define NARG 15
  21. #define NTO 16
  22. #define NFROM 17
  23. #define NAPPEND 18
  24. #define NTOFD 19
  25. #define NFROMFD 20
  26. #define NHERE 21
  27. #define NXHERE 22
  28.  
  29.  
  30.  
  31. struct nbinary {
  32.       int type;
  33.       union node *ch1;
  34.       union node *ch2;
  35. };
  36.  
  37.  
  38. struct ncmd {
  39.       int type;
  40.       int backgnd;
  41.       union node *args;
  42.       union node *redirect;
  43. };
  44.  
  45.  
  46. struct npipe {
  47.       int type;
  48.       int backgnd;
  49.       struct nodelist *cmdlist;
  50. };
  51.  
  52.  
  53. struct nredir {
  54.       int type;
  55.       union node *n;
  56.       union node *redirect;
  57. };
  58.  
  59.  
  60. struct nif {
  61.       int type;
  62.       union node *test;
  63.       union node *ifpart;
  64.       union node *elsepart;
  65. };
  66.  
  67.  
  68. struct nfor {
  69.       int type;
  70.       union node *args;
  71.       union node *body;
  72.       char *var;
  73. };
  74.  
  75.  
  76. struct ncase {
  77.       int type;
  78.       union node *expr;
  79.       union node *cases;
  80. };
  81.  
  82.  
  83. struct nclist {
  84.       int type;
  85.       union node *next;
  86.       union node *pattern;
  87.       union node *body;
  88. };
  89.  
  90.  
  91. struct narg {
  92.       int type;
  93.       union node *next;
  94.       char *text;
  95.       struct nodelist *backquote;
  96. };
  97.  
  98.  
  99. struct nfile {
  100.       int type;
  101.       union node *next;
  102.       int fd;
  103.       union node *fname;
  104.       char *expfname;
  105. };
  106.  
  107.  
  108. struct ndup {
  109.       int type;
  110.       union node *next;
  111.       int fd;
  112.       int dupfd;
  113. };
  114.  
  115.  
  116. struct nhere {
  117.       int type;
  118.       union node *next;
  119.       int fd;
  120.       union node *doc;
  121. };
  122.  
  123.  
  124. union node {
  125.       int type;
  126.       struct nbinary nbinary;
  127.       struct ncmd ncmd;
  128.       struct npipe npipe;
  129.       struct nredir nredir;
  130.       struct nif nif;
  131.       struct nfor nfor;
  132.       struct ncase ncase;
  133.       struct nclist nclist;
  134.       struct narg narg;
  135.       struct nfile nfile;
  136.       struct ndup ndup;
  137.       struct nhere nhere;
  138. };
  139.  
  140.  
  141. struct nodelist {
  142.     struct nodelist *next;
  143.     union node *n;
  144. };
  145.  
  146.  
  147. #ifdef __STDC__
  148. union node *copyfunc(union node *);
  149. void freefunc(union node *);
  150. #else
  151. union node *copyfunc();
  152. void freefunc();
  153. #endif
  154.